const SMSClient = require('@alicloud/sms-sdk')
let config = {
	accessKeyId: 'LTAIlXiWf5AfPzXP', //自己申请的accessKeyId
	secretAccessKey: 'AlgYhqldFskavS41LpusszHxrMNK1j' //对应的secretAccessKey
};
let smsClient = new SMSClient(config);
module.exports = function(text) {
	//发送短信
	smsClient.sendSMS({
		PhoneNumbers: '15516507061',
	    SignName: '石松岩',
	    TemplateCode: 'SMS_102305013',
	    TemplateParam: '{"text":" '+text+' "}'
	})
	.then(function (res) {
	    let {Code} = res;
	    if (Code == 'OK') {
	        console.log('短信发送成功')
	    }
	}, function (err) {
	    console.log('短信发送失败',err)
	})
}